// pages/Popular-works/Popular-works-template.js
import * as API from "../../utils/config.js"

Page({
  //跳转到作品具体目录
  gopopularcontent: function (event) {
    // console.log(event)
    var postId = event.currentTarget.dataset.postid;
    // console.log(postId)
    wx.navigateTo({
      url:"/pages/Work-content/Work-content?id="+postId,
     
    })
  },
  
  // 少年漫画的后台数据获取
  onLoad: function (options) {
    this._youngmanData()
  },
  _youngmanData() {
    wx.request({
      url: API.youngman,
      success: (res) => {

        this.setData({
          youngmanList: res.data.result.bookList
        })
        // console.log(this.data.youngmanList)
      }
    })
    // console.log(API)
  },
})